package com.dpiinc.TechPage.menu;

import android.content.Context;
import androidx.core.view.ActionProvider;
import android.view.Menu;
import android.view.SubMenu;
import android.view.View;

import com.dpiinc.TechPage.R;

/**
 * Created by hu489_000 on 2018-07-21.
 */

public class MenuHdrMoreActionProvider extends ActionProvider {
    /**
     * Creates a new instance.
     *
     * @param context Context for accessing resources.
     */
    public MenuHdrMoreActionProvider(Context context) {
        super(context);
    }

    @Override
    public View onCreateActionView() {
        return null;
    }

    @Override
    public boolean hasSubMenu() {
        return true;
    }

    @Override
    public void onPrepareSubMenu(SubMenu subMenu) {
        super.onPrepareSubMenu(subMenu);
        subMenu.clear();
        subMenu.add(Menu.NONE, R.id.toolbar_chinese, 0, R.string.toolbar_chinese);
        subMenu.add(Menu.NONE, R.id.toolbar_english, 1, R.string.toolbar_english);
    }
}
